package com.dc.modules.test.simple.domain;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.dc.commons.persistence.AuditEntity;
import com.dc.commons.persistence.able.OwnerAble;
import com.dc.commons.persistence.embeddable.Dict;
import com.dc.commons.persistence.embeddable.Member;

@Entity
@Table(name="DC_Simple")
public class Simple extends AuditEntity implements OwnerAble{
	
	private Dict hobby;

	public Simple(){

	}
	public Simple(String id){
	}
	
	private String name;
	private Member ownerKey;
	
	@Column(name="name_",length=100)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	


	/* (non-Javadoc)
	 * @see com.dc.commons.persistence.able.OwnerAble#setOwnerKey(com.dc.commons.persistence.embeddable.Persion)
	 */
	@Override
	public void setOwnerKey(Member persion) {
		this.ownerKey=persion;
	}
	/* (non-Javadoc)
	 * @see com.dc.commons.persistence.able.OwnerAble#getOwnerKey()
	 */
	@AttributeOverrides({
		@AttributeOverride(name=Member.CODE,column=@Column(name="OWNER_KEY",length=50))
	})
	@Override
	public Member getOwnerKey() {
		return this.ownerKey;
	}


	@AttributeOverrides({
		@AttributeOverride(name=Dict.CODE,column=@Column(name="hobby",length=50))
	})
	public Dict getHobby() {
		return hobby;
	}

	public void setHobby(Dict hobby) {
		this.hobby = hobby;
	}


}
